package avicit.bdp.dds.dao.mapper;

import avicit.bdp.common.base.BaseDAO;
import avicit.bdp.dds.dao.entity.Schedule;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * scheduler mapper interface
 */
public interface ScheduleMapper extends BaseDAO<Schedule> {

    /**
     * scheduler page
     * @param processDefinitionId processDefinitionId
     * @param searchVal searchVal
     * @return scheduler IPage
     */
	Page<Schedule> queryByProcessDefineIdPaging(@Param("processDefinitionId") String processDefinitionId,
                                                 @Param("searchVal") String searchVal);

    /**
     * query schedule list by project name
     * @param projectName projectName
     * @return schedule list
     */
    List<Schedule> querySchedulerListByProjectName(@Param("projectName") String projectName);

    /**
     * query schedule list by process definition ids
     * @param processDefineIds processDefineIds
     * @return schedule list
     */
    List<Schedule> selectAllByProcessDefineArray(@Param("processDefineIds") String[] processDefineIds);

    /**
     * query schedule list by process definition id
     * @param processDefinitionId processDefinitionId
     * @return schedule list
     */
    List<Schedule> queryByProcessDefinitionId(@Param("processDefinitionId") String processDefinitionId);

    /**
     * query schedule list by process definition id
     * @param processDefinitionId processDefinitionId
     * @return schedule list
     */
    List<Schedule> queryReleaseSchedulerListByProcessDefinitionId(@Param("processDefinitionId") String processDefinitionId);

}
